import { CommonText } from '../../../../../../components/typography/CommonText.tsx';
import { BLOCK_CHAIN_URL, SPACE_SYMBOL } from '../../../../../../utils';

import type { Metadata } from '../../../../../../types.ts';
import type { FC } from 'react';

interface ICardItemDescriptionProps {
    NFT: Metadata;
    isLast: boolean;
}
export const CardItemDescription:FC<ICardItemDescriptionProps> = ({ NFT, isLast }) => {
    return (
        <CommonText regular key={NFT.contract + NFT.tokenId}>
            <a target="_blank" href={`${BLOCK_CHAIN_URL}${NFT.contract}`}>
                {NFT.name !== 'нет имени' ? NFT.name : NFT.contract}
            </a>
            {isLast && `,${SPACE_SYMBOL}`}
        </CommonText>
    );
};